import java.util.Scanner;
class HomeworkPExer20{
	public static void main(String[] args){
		int a = 1;
		while(a<5){
			for(int b=1;b<=5;b++){
				System.out.print(b+" ");
			}
			System.out.println();
			a++;
		}	
	}
}